-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create_time_partitions and drop_old_time_partitions with less lock. #7540
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7540 +/- ##
==========================================
- Coverage 89.68% 89.68% -0.01%
==========================================
Files 282 283 +1
Lines 60420 60428 +8
Branches 7523 7525 +2
==========================================
+ Hits 54187 54193 +6
- Misses 4079 4082 +3
+ Partials 2154 2153 -1 |
Thank you for the contribution. This seems like a really nice improvement. For it to actually do something you have to create the relevant 12.2-1.sql files by copying latest.sql. See here for details: https://github.com/citusdata/citus/blob/main/CONTRIBUTING.md#changing-or-creating-functions |
done |
Ah, sorry I guess I wasn't clear before. You shouldn't update the old sql files. You should create:
And And do the reverse includes in: src/backend/distributed/sql/downgrades/citus--12.1-1--12.0-1.sql |
I think it's no need to modify downgrades script yes? |
I'm sorry, I messed up the version numbers in my previous message. Corrected below: You shouldn't update the old sql files. You should create:
And And do the reverse includes in: src/backend/distributed/sql/downgrades/citus--12.2-1--12.1-1.sql |
file renamed |
You didn't do this part yet:
And you also need to update the Finally, could you undo the removal of the trailing new line in these files. No changes should be necessary to these files at all:
|
DESCRIPTION: PR description that will go into the change log, up to 78 characters
from:https://www.postgresql.org/docs/14/sql-createtable.html
Note that creating a partition using PARTITION OF requires taking an ACCESS EXCLUSIVE lock on the parent partitioned table. Likewise, dropping a partition with DROP TABLE requires taking an ACCESS EXCLUSIVE lock on the parent table. It is possible to use ALTER TABLE ATTACH/DETACH PARTITION to perform these operations with a weaker lock, thus reducing interference with concurrent operations on the partitioned table.